home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 29
/
Volume 29 - JOGO DISK .iso
/
Games
/
jungle_adventure.swf
/
scripts
/
__Packages
/
SimpleStatusBar.as
< prev
next >
Wrap
Text File
|
2006-11-29
|
926b
|
44 lines
class SimpleStatusBar extends MovieClip
{
var __value = 1;
var minimum = 0;
var maximum = 1;
var range = SimpleStatusBar.prototype.maximum - SimpleStatusBar.prototype.minimum;
function SimpleStatusBar()
{
super();
}
function setRange(min, max)
{
if(min < max)
{
this.minimum = min;
this.maximum = max;
}
else
{
this.minimum = max;
this.maximum = min;
}
this.range = this.maximum - this.minimum;
}
function setValue(v)
{
v = Math.min(this.maximum,Math.max(this.minimum,v));
if(v == this.__value)
{
return undefined;
}
this.__value = v;
this.valueBar._xscale = Math.max(1,this.__value * 100);
}
function set value(v)
{
this.setValue(v);
}
function get value()
{
return this.__value;
}
}